const fileServer = require("../../service/fileServer");
const formatResponse = require("../../common/formatResponse");

class fileController {
    async uploadImg(ctx) {
        let params = ctx.request;
        const result = await fileServer.uploadImg();
        if (result) {
            ctx.body = formatResponse.success({
                result, params
            })
        } else {
            ctx.body = formatResponse.error("unique")
        }
    }
}

module.exports = new fileController();